package DivorceTopOne4;


import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

public class DivorceGroupComparator  extends WritableComparator {

    protected DivorceGroupComparator(){ super(DivorceBean.class,true);}

    @Override
    public int compare(WritableComparable a, WritableComparable b) {

        DivorceBean aBean = (DivorceBean) a;
        DivorceBean bBean = (DivorceBean) b;

        return aBean.getProvince().compareTo(bBean.getProvince());
    }


}


